<template>
	<view class="content">
		<view class="" style="margin: 0 20rpx;"  v-for="(item,index) in menuData" :key="index" v-if="item.look">
			<view class="information">
				{{item.menuName}}
			</view>
			<view class="duild_meus">
				<view v-for="(item1,index1) in item.children" :key="index1" v-if="item1.look" class="bed_item" hover-class="button-hover"
				 @click="goBuildList(item1)">
					<image :src="item1.iconPath" class="icon_radius" :style="{backgroundColor:item1.bgColor}"></image>
					<text>
						{{item1.menuName}}
					</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
menuData:[]
			};
		},
		onLoad(option) {
			// 接收参数
			this.menuData = this.$store.state.com.routerData
			console.log(this.menuData)
		},
		methods: {
			goBuildList(item) {
				var type=''
				  switch (item.enName) {
					case "qiyeziliao":
					  type=false
					  break;
					default:
					  type=''
					  break;
				  }
				  if(type===false){
					uni.navigateTo({
						url: '/pages/businessAdministration/enterpriseData/list'
					})
				  }else{
					uni.navigateTo({
						url: item.router
					})
				  }
			},
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		.information {
			font-size: 26rpx;
			margin-top: 20rpx;
			font-weight: 500;
			color: #888888;
			border-bottom: 1rpx solid rgba($color: #F6F6F6, $alpha: 1.0);
			padding: 20rpx 0 20rpx 40rpx;
			box-sizing: border-box;
			background: #FFFFFF;
			border-top-right-radius: 12rpx;
			border-top-left-radius:12rpx ;
		}

		.duild_meus {
			display: flex;
			justify-content: flex-start;
			box-sizing: border-box;
			flex-wrap: wrap;
			background: #FFFFFF;
			// box-shadow: 0px 2px 6px rgba($color: $uni-line-shadow, $alpha: 0.7);
			border-bottom-right-radius: 12rpx;
			border-bottom-left-radius:12rpx ;

			.bed_item {
				width: 33%;
				border-right: 1rpx solid rgba($color: #F6F6F6, $alpha: 1.0);
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				padding: 50rpx 0;

			&:nth-child(3n){
				border-right: none;
			}
				image {
					width: 80rpx;
					height: 80rpx;
					margin-bottom: 20rpx;
				}

				text {
					font-size: 26rpx;
					color: #000000;
				}
			}
		}
	}
</style>
